const path = require("path");
const resolve = dir => path.join(__dirname, dir);

module.exports = {
  runtimeCompiler: true,
  publicPath: '/',
  outputDir: 'dist',
  assetsDir: 'static',
  chainWebpack: config => {
    config.resolve.alias.set("@", resolve("src"));
  },
  devServer: {
    proxy: {
      "/dev": {
        target: "http://124.71.131.138:8100", // 通过本地服务器将你的请求转发到3000端口（json-server的端口）
        changeOrigin: true, // 设置这个参数可以避免跨域
        logLevel: 'debug',
        ws:true,
        pathRewrite: {
          "^/dev": ""
        }
      }
    }
  },
  lintOnSave:false
};